#pragma once
// 1.提供日志等级
// 2.将日志等级转化为对应字符串

namespace mylog
{
    class Level
    {
    public:
        enum class value
        {
            UNKNOW=0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF
        };

        static const char* toString(Level::value level)
        {
            switch(level)
            {
                case Level::value::DEBUG : return "DEBUG";
                case Level::value::INFO  : return "INFO";
                case Level::value::WARN  : return "WARN";
                case Level::value::ERROR : return "ERROR";
                case Level::value::FATAL : return "FATAL";
                case Level::value::OFF   : return "OFF";
            }
            return "UNKNOW";
        }
    };
}